using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Conditional
{
    /// <summary>
    /// <para>Con</para>
    /// <para>Performs a conditional if/else evaluation on each of the input cells of an input raster.</para>
    /// <para>对输入栅格的每个输入像元执行条件 if/else 评估。</para>
    /// </summary>    
    [DisplayName("Con")]
    public class _Con : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public _Con()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_conditional_raster">
        /// <para>Input conditional raster</para>
        /// <para><xdoc>
        ///   <para>Input raster representing the true or false result of the desired condition.</para>
        ///   <para>It can be of integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示所需条件的真或假结果的输入栅格。</para>
        ///   <para>它可以是整数或浮点类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_true_raster_or_constant">
        /// <para>Input true raster or constant value</para>
        /// <para><xdoc>
        ///   <para>The input whose values will be used as the output cell values if the condition is true.</para>
        ///   <para>It can be an integer or a floating point raster, or a constant value.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果条件为 true，则其值将用作输出单元格值的输入。</para>
        ///   <para>它可以是整数、浮点栅格或常量值。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// </param>
        public _Con(object _in_conditional_raster, object _in_true_raster_or_constant, object _out_raster)
        {
            this._in_conditional_raster = _in_conditional_raster;
            this._in_true_raster_or_constant = _in_true_raster_or_constant;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Con";

        public override string CallName => "sa.Con";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_conditional_raster, _in_true_raster_or_constant, _out_raster, _in_false_raster_or_constant, _where_clause];

        /// <summary>
        /// <para>Input conditional raster</para>
        /// <para><xdoc>
        ///   <para>Input raster representing the true or false result of the desired condition.</para>
        ///   <para>It can be of integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示所需条件的真或假结果的输入栅格。</para>
        ///   <para>它可以是整数或浮点类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input conditional raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_conditional_raster { get; set; }


        /// <summary>
        /// <para>Input true raster or constant value</para>
        /// <para><xdoc>
        ///   <para>The input whose values will be used as the output cell values if the condition is true.</para>
        ///   <para>It can be an integer or a floating point raster, or a constant value.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果条件为 true，则其值将用作输出单元格值的输入。</para>
        ///   <para>它可以是整数、浮点栅格或常量值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input true raster or constant value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_true_raster_or_constant { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Input false raster or constant value</para>
        /// <para><xdoc>
        ///   <para>The input whose values will be used as the output cell values if the condition is false.</para>
        ///   <para>It can be an integer or a floating point raster, or a constant value.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果条件为 false，则其值将用作输出单元格值的输入。</para>
        ///   <para>它可以是整数、浮点栅格或常量值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input false raster or constant value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_false_raster_or_constant { get; set; } = null;


        /// <summary>
        /// <para>Expression</para>
        /// <para><xdoc>
        ///   <para>A logical expression that determines which of the input cells are to be true or false.</para>
        ///   <para>The Where clause follows the general form of an SQL expression. It can be entered directly, for example, VALUE > 100, if you click the Edit SQL mode button . If in the Edit Clause Mode , you can begin constructing the expression by clicking on the Add Clause Mode button.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个逻辑表达式，用于确定哪些输入单元格为 true 或 false。</para>
        ///   <para>Where 子句遵循 SQL 表达式的常规形式。可以直接输入它，例如，VALUE > 100，如果单击 编辑 SQL 模式按钮 。如果在 Edit Clause Mode 中，您可以通过单击 Add Clause Mode 按钮开始构造表达式。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        public _Con SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}